<?php echo Modules::run('content/header_content') ?>

<script>
  /* when document is ready */
  $(function(){

    /* initiate the plugin */
    $("div.holder").jPages({
      containerID  : "itemContainer",
      perPage      : 12,
      startPage    : 1,
      startRange   : 1,
      midRange     : 5,
      endRange     : 1
    });

  });
</script>


<div class="container main">
  <div>
    
    <div class="15">
      
      <div class="row">
        
        <div class="span5 sidebar">
          <?php echo Modules::run('content/sidebar_content') ?>
        </div>
        
        <div class="span10 content">
          <h2>
            <a href="http://multiply.co.id/Pria/c-by5ofro77o">
              Pria
            </a>
            
            <i class="icon-chevron-right icon-orange">
            </i>
            Pakaian
          </h2>
          <div class="row box-product-row box">
            <div class="product-nav">
              <div class="sort">
                <p class="pull-left">
                  Sort by Price
                </p>
                <p class="pull-left">
                  <a href="#" class="sort-price " id="high" data-sort="high">
                    Highest
                  </a>
                </p>
                <p class="pull-left">
                  <a href="#" class="sort-price " id="low" data-sort="low">
                    Lowest
                  </a>
                </p>
              </div>
              <div class="view">
                <p class="view-text">
                  Display
                </p>
                <p class="btn-view-grid">
                  <!--<a href="<?php echo site_url('category/grid/'/*.$match_cat*/); ?>" class="view-grid ">-->
                  <a href="#" class="view-grid ">
                    <span>
                      Grid
                    </span>
                  </a>
                </p>
                <p class="btn-view-list">
                  <!--<a href="<?php echo site_url('category/index/'/*.$match_cat*/); ?>" class="view-list view-list-hover">-->
                  <a href="#" class="view-list view-list-hover">
                    <span>
                      List
                    </span>
                  </a>
                </p>
              </div>
            </div>
            <h2>
              New Products
            </h2>
            
            <div id="itemContainer" class="cat-box">
            
            <?php foreach ($product as $key => $val) { ?>

				<?php 
                $product_id = $val->product_id;
                $price = number_format($val->price,2,',','.'); 
        
                $product_name_length = strlen($val->product_name);
                $product_name_limit = $val->product_name;
        
                if ($product_name_length > 18){
                    $product_name_limit = substr($val->product_name, 0, 18) . '..';
                }
                
                ?>
            
              <div class="box-product box-product-list" data-store="#" data-product-id="<?php echo $product_id ?>" data-product-title="<?php echo $val->product_name; ?>">
                <div class="row">
                  <div class="span3 product_image">
                    <a href="<?php echo site_url('product/detail/'.$val->product_seo_name); ?>">
                      <img src="<?php echo base_url('data/thumb/'.$val->image_file) ?>" title="<?php echo $val->product_name ?> Rp <?php echo $price ?>" alt="<?php echo $val->product_name ?> Rp <?php echo $price ?>">
                    </a>
                  </div>
                  <div class="span5">
                    <div class="name">
                      <a href="<?php echo site_url('product/detail/'.$val->product_seo_name); ?>" title="<?php echo $val->product_name ?> Rp <?php echo $price ?>">
                        <?php echo $val->product_name ?>
                      </a>
                    </div>
                    <div class="desc ellipsis">
                      <?php echo $val->description ?> 
                    </div>
                    <div class="shop">
                      <a href="#" title="Lorem lipsum dolor sit">
                        Lorem lipsum dolor sit
                      </a>
                    </div>
                  </div>
                  <div class="span2">
                    <div class="price">
                      Rp <?php echo $price ?>
                    </div>
                    <a class="add_cart" onclick="alert('<?php echo $product_id; ?>')">Add to Cart</a>
                  </div>
                </div>
              </div>
			  <?php } ?>
            </div>
            <div class="clearfix">
            </div>
             <center><div class="holder"></div></center>
          </div>
          
        </div>
      </div>
    </div>
  </div>
</div>



<?php echo Modules::run('content/footer_content') ?>